package guoanmaker.provider.business.model;


import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import guoanmaker.provider.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
 * 
* @ClassName: PersonalAppraise 
* @Description: 评价
* @author Yvonne_MGL
* @date 2017年7月20日 下午3:12:49 
*  
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_personal_appraise")
public class PersonalAppraise extends IdEntity{
	private String info;//评价信息，格式为   评价类别名称@分数,评价类别名称@分数,评价类别名称@分数,...
	private Double averageValue;//平均分
	private String appraise;//评价内存
	private String commodityId;//商品id
	private Date appraiseTime;//评价时间
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "order_id")
	private ProvideOrderForm orderForm;//关联评价
	private String isShow;
	private String reply;
	private Date replyTime;
	public PersonalAppraise(String info, Double averageValue, String appraise, String commodityId, Date appraiseTime, ProvideOrderForm orderForm) {
		this.info = info;
		this.averageValue = averageValue;
		this.appraise = appraise;
		this.commodityId = commodityId;
		this.appraiseTime = appraiseTime;
		this.orderForm = orderForm;
	}

	public PersonalAppraise(String info, Double averageValue, String appraise, String commodityId, Date appraiseTime, ProvideOrderForm orderForm, String isShow) {
		this.info = info;
		this.averageValue = averageValue;
		this.appraise = appraise;
		this.commodityId = commodityId;
		this.appraiseTime = appraiseTime;
		this.orderForm = orderForm;
		this.isShow = isShow;
	}
}
